package com.aiit.datamanager.controller;

import com.aiit.datamanager.entity.Employee;
import com.aiit.datamanager.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 *
 */
@Controller
public class LoginController {

    @Autowired
    private EmployeeService employeeService;

    @RequestMapping(path = "/register", method = RequestMethod.GET)
    @ResponseBody
    public Model register(Model model){
        Map<String, Object> map = new HashMap<>();
        map.put("aba", new Employee());
        model.addAllAttributes(map);
        return model;
    }

//    @RequestMapping(path = "/register", method = RequestMethod.GET)
//    public String register(Model model, Employee employee){
//
//        return "abaabaabaaabaabaababbababa";
//    }

    @RequestMapping("/login")
    public String login(Model model, Employee employee){

        return null;
    }

}
